from datetime import date, timedelta

from Routine.UpdateFX import *
from Routine.UpdateStockStatic import update_stock_static_info_from_vendor
from Routine.UpdateStockPrice import *


def test_update_daily_price():
	d = date(2011, 9, 26)
	one_day = timedelta(days=1)
	
	while d<date(2011, 10, 10):
		update_CH_stock_daily_price(d)
		update_HK_stock_daily_price(d)
		update_US_stock_daily_price(d)
		update_futures_daily_settlement_price(d)
		
		d += one_day
		
		
def test_update_daily_fx(start_date):
	d = start_date
	one_day = timedelta(days=1)		
	while d<date.today():
		update_fx_daily_price(d)	
		print 'info, update_fx_daily_price @', d, ' completed...'
		
		d += one_day


def test_update_stock_static():
	update_stock_static_info_from_vendor(date.today())